package modules
{
	import flash.utils.Dictionary;
	
	import mx.modules.ModuleBase;
	
	import views.interfaces.IUiBase;
	
	public class UIModuleBase extends ModuleBase
	{
		
		public var uiClass:Dictionary;
		
		public function UIModuleBase()
		{
			super();
			uiClass = new Dictionary();
		}
		
		public function getUIByName( name:String ):IUiBase
		{
			if( uiClass[ name ] != null )
			{
				var cls:Class = uiClass[name] as Class;
				var object:Object = new cls();
				return IUiBase( object );
			}
			else
			{
				return null;
			}
		}
	}
}